<?php

use Illuminate\Database\Seeder;
use Dcat\Admin\Models\Menu;

class MenusSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $items = [
            ['id' => 8, 'parent_id' => 0, 'order'=>7, 'title'=>'村民管理', 'icon'=> 'fa-address-book-o', 'uri'=>'users', ],
            ['id' => 9, 'parent_id' => 2, 'order'=>8, 'title'=>'配置', 'icon'=> 'fa-cogs', 'uri'=>'config', ],
            ['id' => 10, 'parent_id' => 0, 'order'=>9, 'title'=>'通告', 'icon'=> 'fa-bullhorn', 'uri'=>'circular', ],
        ];
        foreach ($items as $item) {
            Menu::updateOrCreate(['id' => $item['id']], $item);
        }
    }
}
